//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension IdentityStore {
    // MARK: Enums

    public enum ConflictExceptionReason: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case concurrentModification = "CONCURRENT_MODIFICATION"
        case uniquenessConstraintViolation = "UNIQUENESS_CONSTRAINT_VIOLATION"
        public var description: String { return self.rawValue }
    }

    public enum ResourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case group = "GROUP"
        case groupMembership = "GROUP_MEMBERSHIP"
        case identityStore = "IDENTITY_STORE"
        case user = "USER"
        public var description: String { return self.rawValue }
    }

    public enum AlternateIdentifier: AWSEncodableShape, Sendable {
        /// The identifier issued to this resource by an external identity provider.
        case externalId(ExternalId)
        /// An entity attribute that's unique to a specific entity.
        case uniqueAttribute(UniqueAttribute)

        public func encode(to encoder: Encoder) throws {
            var container = encoder.container(keyedBy: CodingKeys.self)
            switch self {
            case .externalId(let value):
                try container.encode(value, forKey: .externalId)
            case .uniqueAttribute(let value):
                try container.encode(value, forKey: .uniqueAttribute)
            }
        }

        public func validate(name: String) throws {
            switch self {
            case .externalId(let value):
                try value.validate(name: "\(name).externalId")
            case .uniqueAttribute(let value):
                try value.validate(name: "\(name).uniqueAttribute")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case externalId = "ExternalId"
            case uniqueAttribute = "UniqueAttribute"
        }
    }

    // MARK: Shapes

    public struct Address: AWSEncodableShape & AWSDecodableShape {
        /// The country of the address.
        public let country: String?
        /// A string containing a formatted version of the address for display.
        public let formatted: String?
        /// A string of the address locality.
        public let locality: String?
        /// The postal code of the address.
        public let postalCode: String?
        /// A Boolean value representing whether this is the primary address for the associated resource.
        public let primary: Bool?
        /// The region of the address.
        public let region: String?
        /// The street of the address.
        public let streetAddress: String?
        /// A string representing the type of address. For example, "Home."
        public let type: String?

        @inlinable
        public init(country: String? = nil, formatted: String? = nil, locality: String? = nil, postalCode: String? = nil, primary: Bool? = nil, region: String? = nil, streetAddress: String? = nil, type: String? = nil) {
            self.country = country
            self.formatted = formatted
            self.locality = locality
            self.postalCode = postalCode
            self.primary = primary
            self.region = region
            self.streetAddress = streetAddress
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.country, name: "country", parent: name, max: 1024)
            try self.validate(self.country, name: "country", parent: name, min: 1)
            try self.validate(self.country, name: "country", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.formatted, name: "formatted", parent: name, max: 1024)
            try self.validate(self.formatted, name: "formatted", parent: name, min: 1)
            try self.validate(self.formatted, name: "formatted", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.locality, name: "locality", parent: name, max: 1024)
            try self.validate(self.locality, name: "locality", parent: name, min: 1)
            try self.validate(self.locality, name: "locality", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.postalCode, name: "postalCode", parent: name, max: 1024)
            try self.validate(self.postalCode, name: "postalCode", parent: name, min: 1)
            try self.validate(self.postalCode, name: "postalCode", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.region, name: "region", parent: name, max: 1024)
            try self.validate(self.region, name: "region", parent: name, min: 1)
            try self.validate(self.region, name: "region", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.streetAddress, name: "streetAddress", parent: name, max: 1024)
            try self.validate(self.streetAddress, name: "streetAddress", parent: name, min: 1)
            try self.validate(self.streetAddress, name: "streetAddress", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.type, name: "type", parent: name, max: 1024)
            try self.validate(self.type, name: "type", parent: name, min: 1)
            try self.validate(self.type, name: "type", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case country = "Country"
            case formatted = "Formatted"
            case locality = "Locality"
            case postalCode = "PostalCode"
            case primary = "Primary"
            case region = "Region"
            case streetAddress = "StreetAddress"
            case type = "Type"
        }
    }

    public struct AttributeOperation: AWSEncodableShape {
        /// A string representation of the path to a given attribute or sub-attribute. Supports JMESPath.
        public let attributePath: String
        /// The value of the attribute. This is a Document type. This type is not supported by Java V1, Go V1, and older versions of the CLI.
        public let attributeValue: AWSDocument?

        @inlinable
        public init(attributePath: String, attributeValue: AWSDocument? = nil) {
            self.attributePath = attributePath
            self.attributeValue = attributeValue
        }

        public func validate(name: String) throws {
            try self.validate(self.attributePath, name: "attributePath", parent: name, max: 255)
            try self.validate(self.attributePath, name: "attributePath", parent: name, min: 1)
            try self.validate(self.attributePath, name: "attributePath", parent: name, pattern: "^\\p{L}+(?:\\.\\p{L}+){0,2}$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributePath = "AttributePath"
            case attributeValue = "AttributeValue"
        }
    }

    public struct ConflictException: AWSErrorShape {
        public let message: String?
        /// This request cannot be completed for one of the following reasons:   Performing the requested operation would violate an existing uniqueness claim in the identity store. Resolve the conflict before retrying this request.   The requested resource was being concurrently modified by another request.
        public let reason: ConflictExceptionReason?
        /// The identifier for each request. This value is a globally unique ID that is generated by the identity store service for each sent request, and is then returned inside the exception if the request fails.
        public let requestId: String?

        @inlinable
        public init(message: String? = nil, reason: ConflictExceptionReason? = nil, requestId: String? = nil) {
            self.message = message
            self.reason = reason
            self.requestId = requestId
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case reason = "Reason"
            case requestId = "RequestId"
        }
    }

    public struct CreateGroupMembershipRequest: AWSEncodableShape {
        /// The identifier for a group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// An object that contains the identifier of a group member. Setting the UserID field to the specific identifier for a user indicates that the user is a member of the group.
        public let memberId: MemberId

        @inlinable
        public init(groupId: String, identityStoreId: String, memberId: MemberId) {
            self.groupId = groupId
            self.identityStoreId = identityStoreId
            self.memberId = memberId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupId, name: "groupId", parent: name, max: 47)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.memberId.validate(name: "\(name).memberId")
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
            case memberId = "MemberId"
        }
    }

    public struct CreateGroupMembershipResponse: AWSDecodableShape {
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// The identifier for a newly created GroupMembership in an identity store.
        public let membershipId: String

        @inlinable
        public init(identityStoreId: String, membershipId: String) {
            self.identityStoreId = identityStoreId
            self.membershipId = membershipId
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case membershipId = "MembershipId"
        }
    }

    public struct CreateGroupRequest: AWSEncodableShape {
        /// A string containing the description of the group.
        public let description: String?
        /// A string containing the name of the group. This value is commonly displayed when the group is referenced. Administrator and AWSAdministrators are reserved names and can't be used for users or groups.
        public let displayName: String?
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String

        @inlinable
        public init(description: String? = nil, displayName: String? = nil, identityStoreId: String) {
            self.description = description
            self.displayName = displayName
            self.identityStoreId = identityStoreId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.displayName, name: "displayName", parent: name, max: 1024)
            try self.validate(self.displayName, name: "displayName", parent: name, min: 1)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  ]+$")
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case displayName = "DisplayName"
            case identityStoreId = "IdentityStoreId"
        }
    }

    public struct CreateGroupResponse: AWSDecodableShape {
        /// The identifier of the newly created group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String

        @inlinable
        public init(groupId: String, identityStoreId: String) {
            self.groupId = groupId
            self.identityStoreId = identityStoreId
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
        }
    }

    public struct CreateUserRequest: AWSEncodableShape {
        /// A list of Address objects containing addresses associated with the user.
        public let addresses: [Address]?
        /// A string containing the name of the user. This value is typically formatted for display when the user is referenced. For example, "John Doe."
        public let displayName: String?
        /// A list of Email objects containing email addresses associated with the user.
        public let emails: [Email]?
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// A string containing the geographical region or location of the user.
        public let locale: String?
        /// An object containing the name of the user.
        public let name: Name?
        /// A string containing an alternate name for the user.
        public let nickName: String?
        /// A list of PhoneNumber objects containing phone numbers associated with the user.
        public let phoneNumbers: [PhoneNumber]?
        /// A string containing the preferred language of the user. For example, "American English" or "en-us."
        public let preferredLanguage: String?
        /// A string containing a URL that might be associated with the user.
        public let profileUrl: String?
        /// A string containing the time zone of the user.
        public let timezone: String?
        /// A string containing the title of the user. Possible values are left unspecified. The value can vary based on your specific use case.
        public let title: String?
        /// A unique string used to identify the user. The length limit is 128 characters. This value can consist of letters, accented characters, symbols, numbers, and punctuation. This value is specified at the time the user is created and stored as an attribute of the user object in the identity store. Administrator and AWSAdministrators are reserved names and can't be used for users or groups.
        public let userName: String?
        /// A string indicating the type of user. Possible values are left unspecified. The value can vary based on your specific use case.
        public let userType: String?

        @inlinable
        public init(addresses: [Address]? = nil, displayName: String? = nil, emails: [Email]? = nil, identityStoreId: String, locale: String? = nil, name: Name? = nil, nickName: String? = nil, phoneNumbers: [PhoneNumber]? = nil, preferredLanguage: String? = nil, profileUrl: String? = nil, timezone: String? = nil, title: String? = nil, userName: String? = nil, userType: String? = nil) {
            self.addresses = addresses
            self.displayName = displayName
            self.emails = emails
            self.identityStoreId = identityStoreId
            self.locale = locale
            self.name = name
            self.nickName = nickName
            self.phoneNumbers = phoneNumbers
            self.preferredLanguage = preferredLanguage
            self.profileUrl = profileUrl
            self.timezone = timezone
            self.title = title
            self.userName = userName
            self.userType = userType
        }

        public func validate(name: String) throws {
            try self.addresses?.forEach {
                try $0.validate(name: "\(name).addresses[]")
            }
            try self.validate(self.addresses, name: "addresses", parent: name, max: 1)
            try self.validate(self.addresses, name: "addresses", parent: name, min: 1)
            try self.validate(self.displayName, name: "displayName", parent: name, max: 1024)
            try self.validate(self.displayName, name: "displayName", parent: name, min: 1)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.emails?.forEach {
                try $0.validate(name: "\(name).emails[]")
            }
            try self.validate(self.emails, name: "emails", parent: name, max: 1)
            try self.validate(self.emails, name: "emails", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.locale, name: "locale", parent: name, max: 1024)
            try self.validate(self.locale, name: "locale", parent: name, min: 1)
            try self.validate(self.locale, name: "locale", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.name?.validate(name: "\(name).name")
            try self.validate(self.nickName, name: "nickName", parent: name, max: 1024)
            try self.validate(self.nickName, name: "nickName", parent: name, min: 1)
            try self.validate(self.nickName, name: "nickName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.phoneNumbers?.forEach {
                try $0.validate(name: "\(name).phoneNumbers[]")
            }
            try self.validate(self.phoneNumbers, name: "phoneNumbers", parent: name, max: 1)
            try self.validate(self.phoneNumbers, name: "phoneNumbers", parent: name, min: 1)
            try self.validate(self.preferredLanguage, name: "preferredLanguage", parent: name, max: 1024)
            try self.validate(self.preferredLanguage, name: "preferredLanguage", parent: name, min: 1)
            try self.validate(self.preferredLanguage, name: "preferredLanguage", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.profileUrl, name: "profileUrl", parent: name, max: 1024)
            try self.validate(self.profileUrl, name: "profileUrl", parent: name, min: 1)
            try self.validate(self.profileUrl, name: "profileUrl", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.timezone, name: "timezone", parent: name, max: 1024)
            try self.validate(self.timezone, name: "timezone", parent: name, min: 1)
            try self.validate(self.timezone, name: "timezone", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.title, name: "title", parent: name, max: 1024)
            try self.validate(self.title, name: "title", parent: name, min: 1)
            try self.validate(self.title, name: "title", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.userName, name: "userName", parent: name, max: 128)
            try self.validate(self.userName, name: "userName", parent: name, min: 1)
            try self.validate(self.userName, name: "userName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.userType, name: "userType", parent: name, max: 1024)
            try self.validate(self.userType, name: "userType", parent: name, min: 1)
            try self.validate(self.userType, name: "userType", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case addresses = "Addresses"
            case displayName = "DisplayName"
            case emails = "Emails"
            case identityStoreId = "IdentityStoreId"
            case locale = "Locale"
            case name = "Name"
            case nickName = "NickName"
            case phoneNumbers = "PhoneNumbers"
            case preferredLanguage = "PreferredLanguage"
            case profileUrl = "ProfileUrl"
            case timezone = "Timezone"
            case title = "Title"
            case userName = "UserName"
            case userType = "UserType"
        }
    }

    public struct CreateUserResponse: AWSDecodableShape {
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// The identifier of the newly created user in the identity store.
        public let userId: String

        @inlinable
        public init(identityStoreId: String, userId: String) {
            self.identityStoreId = identityStoreId
            self.userId = userId
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case userId = "UserId"
        }
    }

    public struct DeleteGroupMembershipRequest: AWSEncodableShape {
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// The identifier for a GroupMembership in an identity store.
        public let membershipId: String

        @inlinable
        public init(identityStoreId: String, membershipId: String) {
            self.identityStoreId = identityStoreId
            self.membershipId = membershipId
        }

        public func validate(name: String) throws {
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.membershipId, name: "membershipId", parent: name, max: 47)
            try self.validate(self.membershipId, name: "membershipId", parent: name, min: 1)
            try self.validate(self.membershipId, name: "membershipId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case membershipId = "MembershipId"
        }
    }

    public struct DeleteGroupMembershipResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteGroupRequest: AWSEncodableShape {
        /// The identifier for a group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String

        @inlinable
        public init(groupId: String, identityStoreId: String) {
            self.groupId = groupId
            self.identityStoreId = identityStoreId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupId, name: "groupId", parent: name, max: 47)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
        }
    }

    public struct DeleteGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteUserRequest: AWSEncodableShape {
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// The identifier for a user in the identity store.
        public let userId: String

        @inlinable
        public init(identityStoreId: String, userId: String) {
            self.identityStoreId = identityStoreId
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.userId, name: "userId", parent: name, max: 47)
            try self.validate(self.userId, name: "userId", parent: name, min: 1)
            try self.validate(self.userId, name: "userId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case userId = "UserId"
        }
    }

    public struct DeleteUserResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeGroupMembershipRequest: AWSEncodableShape {
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// The identifier for a GroupMembership in an identity store.
        public let membershipId: String

        @inlinable
        public init(identityStoreId: String, membershipId: String) {
            self.identityStoreId = identityStoreId
            self.membershipId = membershipId
        }

        public func validate(name: String) throws {
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.membershipId, name: "membershipId", parent: name, max: 47)
            try self.validate(self.membershipId, name: "membershipId", parent: name, min: 1)
            try self.validate(self.membershipId, name: "membershipId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case membershipId = "MembershipId"
        }
    }

    public struct DescribeGroupMembershipResponse: AWSDecodableShape {
        /// The identifier for a group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        public let memberId: MemberId
        /// The identifier for a GroupMembership in an identity store.
        public let membershipId: String

        @inlinable
        public init(groupId: String, identityStoreId: String, memberId: MemberId, membershipId: String) {
            self.groupId = groupId
            self.identityStoreId = identityStoreId
            self.memberId = memberId
            self.membershipId = membershipId
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
            case memberId = "MemberId"
            case membershipId = "MembershipId"
        }
    }

    public struct DescribeGroupRequest: AWSEncodableShape {
        /// The identifier for a group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store, such as d-1234567890. In this example, d- is a fixed prefix, and 1234567890 is a randomly generated string that contains numbers and lower case letters. This value is generated at the time that a new identity store is created.
        public let identityStoreId: String

        @inlinable
        public init(groupId: String, identityStoreId: String) {
            self.groupId = groupId
            self.identityStoreId = identityStoreId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupId, name: "groupId", parent: name, max: 47)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
        }
    }

    public struct DescribeGroupResponse: AWSDecodableShape {
        /// A string containing a description of the group.
        public let description: String?
        /// The group’s display name value. The length limit is 1,024 characters. This value can consist of letters, accented characters, symbols, numbers, punctuation, tab, new line, carriage return, space, and nonbreaking space in this attribute. This value is specified at the time that the group is created and stored as an attribute of the group object in the identity store.
        public let displayName: String?
        /// A list of ExternalId objects that contains the identifiers issued to this resource by an external identity provider.
        public let externalIds: [ExternalId]?
        /// The identifier for a group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String

        @inlinable
        public init(description: String? = nil, displayName: String? = nil, externalIds: [ExternalId]? = nil, groupId: String, identityStoreId: String) {
            self.description = description
            self.displayName = displayName
            self.externalIds = externalIds
            self.groupId = groupId
            self.identityStoreId = identityStoreId
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case displayName = "DisplayName"
            case externalIds = "ExternalIds"
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
        }
    }

    public struct DescribeUserRequest: AWSEncodableShape {
        /// The globally unique identifier for the identity store, such as d-1234567890. In this example, d- is a fixed prefix, and 1234567890 is a randomly generated string that contains numbers and lower case letters. This value is generated at the time that a new identity store is created.
        public let identityStoreId: String
        /// The identifier for a user in the identity store.
        public let userId: String

        @inlinable
        public init(identityStoreId: String, userId: String) {
            self.identityStoreId = identityStoreId
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.userId, name: "userId", parent: name, max: 47)
            try self.validate(self.userId, name: "userId", parent: name, min: 1)
            try self.validate(self.userId, name: "userId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case userId = "UserId"
        }
    }

    public struct DescribeUserResponse: AWSDecodableShape {
        /// The physical address of the user.
        public let addresses: [Address]?
        /// The display name of the user.
        public let displayName: String?
        /// The email address of the user.
        public let emails: [Email]?
        /// A list of ExternalId objects that contains the identifiers issued to this resource by an external identity provider.
        public let externalIds: [ExternalId]?
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// A string containing the geographical region or location of the user.
        public let locale: String?
        /// The name of the user.
        public let name: Name?
        /// An alternative descriptive name for the user.
        public let nickName: String?
        /// A list of PhoneNumber objects associated with a user.
        public let phoneNumbers: [PhoneNumber]?
        /// The preferred language of the user.
        public let preferredLanguage: String?
        /// A URL link for the user's profile.
        public let profileUrl: String?
        /// The time zone for a user.
        public let timezone: String?
        /// A string containing the title of the user.
        public let title: String?
        /// The identifier for a user in the identity store.
        public let userId: String
        /// A unique string used to identify the user. The length limit is 128 characters. This value can consist of letters, accented characters, symbols, numbers, and punctuation. This value is specified at the time the user is created and stored as an attribute of the user object in the identity store.
        public let userName: String?
        /// A string indicating the type of user.
        public let userType: String?

        @inlinable
        public init(addresses: [Address]? = nil, displayName: String? = nil, emails: [Email]? = nil, externalIds: [ExternalId]? = nil, identityStoreId: String, locale: String? = nil, name: Name? = nil, nickName: String? = nil, phoneNumbers: [PhoneNumber]? = nil, preferredLanguage: String? = nil, profileUrl: String? = nil, timezone: String? = nil, title: String? = nil, userId: String, userName: String? = nil, userType: String? = nil) {
            self.addresses = addresses
            self.displayName = displayName
            self.emails = emails
            self.externalIds = externalIds
            self.identityStoreId = identityStoreId
            self.locale = locale
            self.name = name
            self.nickName = nickName
            self.phoneNumbers = phoneNumbers
            self.preferredLanguage = preferredLanguage
            self.profileUrl = profileUrl
            self.timezone = timezone
            self.title = title
            self.userId = userId
            self.userName = userName
            self.userType = userType
        }

        private enum CodingKeys: String, CodingKey {
            case addresses = "Addresses"
            case displayName = "DisplayName"
            case emails = "Emails"
            case externalIds = "ExternalIds"
            case identityStoreId = "IdentityStoreId"
            case locale = "Locale"
            case name = "Name"
            case nickName = "NickName"
            case phoneNumbers = "PhoneNumbers"
            case preferredLanguage = "PreferredLanguage"
            case profileUrl = "ProfileUrl"
            case timezone = "Timezone"
            case title = "Title"
            case userId = "UserId"
            case userName = "UserName"
            case userType = "UserType"
        }
    }

    public struct Email: AWSEncodableShape & AWSDecodableShape {
        /// A Boolean value representing whether this is the primary email address for the associated resource.
        public let primary: Bool?
        /// A string representing the type of address. For example, "Work."
        public let type: String?
        /// A string containing an email address. For example, "johndoe@amazon.com."
        public let value: String?

        @inlinable
        public init(primary: Bool? = nil, type: String? = nil, value: String? = nil) {
            self.primary = primary
            self.type = type
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.type, name: "type", parent: name, max: 1024)
            try self.validate(self.type, name: "type", parent: name, min: 1)
            try self.validate(self.type, name: "type", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.value, name: "value", parent: name, max: 1024)
            try self.validate(self.value, name: "value", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case primary = "Primary"
            case type = "Type"
            case value = "Value"
        }
    }

    public struct ExternalId: AWSEncodableShape & AWSDecodableShape {
        /// The identifier issued to this resource by an external identity provider.
        public let id: String
        /// The issuer for an external identifier.
        public let issuer: String

        @inlinable
        public init(id: String, issuer: String) {
            self.id = id
            self.issuer = issuer
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 256)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
            try self.validate(self.issuer, name: "issuer", parent: name, max: 100)
            try self.validate(self.issuer, name: "issuer", parent: name, min: 1)
            try self.validate(self.issuer, name: "issuer", parent: name, pattern: "^(?!(?i)(arn|aws):)[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
            case issuer = "Issuer"
        }
    }

    public struct Filter: AWSEncodableShape {
        /// The attribute path that is used to specify which attribute name to search. Length limit is 255 characters. For example, UserName is a valid attribute path for the ListUsers API, and DisplayName is a valid attribute path for the ListGroups API.
        public let attributePath: String
        /// Represents the data for an attribute. Each attribute value is described as a name-value pair.
        public let attributeValue: String

        @inlinable
        public init(attributePath: String, attributeValue: String) {
            self.attributePath = attributePath
            self.attributeValue = attributeValue
        }

        public func validate(name: String) throws {
            try self.validate(self.attributePath, name: "attributePath", parent: name, max: 255)
            try self.validate(self.attributePath, name: "attributePath", parent: name, min: 1)
            try self.validate(self.attributePath, name: "attributePath", parent: name, pattern: "^\\p{L}+(?:\\.\\p{L}+){0,2}$")
            try self.validate(self.attributeValue, name: "attributeValue", parent: name, max: 1024)
            try self.validate(self.attributeValue, name: "attributeValue", parent: name, min: 1)
            try self.validate(self.attributeValue, name: "attributeValue", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributePath = "AttributePath"
            case attributeValue = "AttributeValue"
        }
    }

    public struct GetGroupIdRequest: AWSEncodableShape {
        /// A unique identifier for a user or group that is not the primary identifier. This value can be an identifier from an external identity provider (IdP) that is associated with the user, the group, or a unique attribute. For the unique attribute, the only valid path is displayName.
        public let alternateIdentifier: AlternateIdentifier
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String

        @inlinable
        public init(alternateIdentifier: AlternateIdentifier, identityStoreId: String) {
            self.alternateIdentifier = alternateIdentifier
            self.identityStoreId = identityStoreId
        }

        public func validate(name: String) throws {
            try self.alternateIdentifier.validate(name: "\(name).alternateIdentifier")
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case alternateIdentifier = "AlternateIdentifier"
            case identityStoreId = "IdentityStoreId"
        }
    }

    public struct GetGroupIdResponse: AWSDecodableShape {
        /// The identifier for a group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String

        @inlinable
        public init(groupId: String, identityStoreId: String) {
            self.groupId = groupId
            self.identityStoreId = identityStoreId
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
        }
    }

    public struct GetGroupMembershipIdRequest: AWSEncodableShape {
        /// The identifier for a group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// An object that contains the identifier of a group member. Setting the UserID field to the specific identifier for a user indicates that the user is a member of the group.
        public let memberId: MemberId

        @inlinable
        public init(groupId: String, identityStoreId: String, memberId: MemberId) {
            self.groupId = groupId
            self.identityStoreId = identityStoreId
            self.memberId = memberId
        }

        public func validate(name: String) throws {
            try self.validate(self.groupId, name: "groupId", parent: name, max: 47)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.memberId.validate(name: "\(name).memberId")
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
            case memberId = "MemberId"
        }
    }

    public struct GetGroupMembershipIdResponse: AWSDecodableShape {
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// The identifier for a GroupMembership in an identity store.
        public let membershipId: String

        @inlinable
        public init(identityStoreId: String, membershipId: String) {
            self.identityStoreId = identityStoreId
            self.membershipId = membershipId
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case membershipId = "MembershipId"
        }
    }

    public struct GetUserIdRequest: AWSEncodableShape {
        /// A unique identifier for a user or group that is not the primary identifier. This value can be an identifier from an external identity provider (IdP) that is associated with the user, the group, or a unique attribute. For the unique attribute, the only valid paths are userName and emails.value.
        public let alternateIdentifier: AlternateIdentifier
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String

        @inlinable
        public init(alternateIdentifier: AlternateIdentifier, identityStoreId: String) {
            self.alternateIdentifier = alternateIdentifier
            self.identityStoreId = identityStoreId
        }

        public func validate(name: String) throws {
            try self.alternateIdentifier.validate(name: "\(name).alternateIdentifier")
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case alternateIdentifier = "AlternateIdentifier"
            case identityStoreId = "IdentityStoreId"
        }
    }

    public struct GetUserIdResponse: AWSDecodableShape {
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// The identifier for a user in the identity store.
        public let userId: String

        @inlinable
        public init(identityStoreId: String, userId: String) {
            self.identityStoreId = identityStoreId
            self.userId = userId
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case userId = "UserId"
        }
    }

    public struct Group: AWSDecodableShape {
        /// A string containing a description of the specified group.
        public let description: String?
        /// The display name value for the group. The length limit is 1,024 characters. This value can consist of letters, accented characters, symbols, numbers, punctuation, tab, new line, carriage return, space, and nonbreaking space in this attribute. This value is specified at the time the group is created and stored as an attribute of the group object in the identity store.
        public let displayName: String?
        /// A list of ExternalId objects that contains the identifiers issued to this resource by an external identity provider.
        public let externalIds: [ExternalId]?
        /// The identifier for a group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String

        @inlinable
        public init(description: String? = nil, displayName: String? = nil, externalIds: [ExternalId]? = nil, groupId: String, identityStoreId: String) {
            self.description = description
            self.displayName = displayName
            self.externalIds = externalIds
            self.groupId = groupId
            self.identityStoreId = identityStoreId
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case displayName = "DisplayName"
            case externalIds = "ExternalIds"
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
        }
    }

    public struct GroupMembership: AWSDecodableShape {
        /// The identifier for a group in the identity store.
        public let groupId: String?
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// An object that contains the identifier of a group member. Setting the UserID field to the specific identifier for a user indicates that the user is a member of the group.
        public let memberId: MemberId?
        /// The identifier for a GroupMembership object in an identity store.
        public let membershipId: String?

        @inlinable
        public init(groupId: String? = nil, identityStoreId: String, memberId: MemberId? = nil, membershipId: String? = nil) {
            self.groupId = groupId
            self.identityStoreId = identityStoreId
            self.memberId = memberId
            self.membershipId = membershipId
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
            case memberId = "MemberId"
            case membershipId = "MembershipId"
        }
    }

    public struct GroupMembershipExistenceResult: AWSDecodableShape {
        /// The identifier for a group in the identity store.
        public let groupId: String?
        /// An object that contains the identifier of a group member. Setting the UserID field to the specific identifier for a user indicates that the user is a member of the group.
        public let memberId: MemberId?
        /// Indicates whether a membership relation exists or not.
        public let membershipExists: Bool?

        @inlinable
        public init(groupId: String? = nil, memberId: MemberId? = nil, membershipExists: Bool? = nil) {
            self.groupId = groupId
            self.memberId = memberId
            self.membershipExists = membershipExists
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case memberId = "MemberId"
            case membershipExists = "MembershipExists"
        }
    }

    public struct IsMemberInGroupsRequest: AWSEncodableShape {
        /// A list of identifiers for groups in the identity store.
        public let groupIds: [String]
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// An object containing the identifier of a group member.
        public let memberId: MemberId

        @inlinable
        public init(groupIds: [String], identityStoreId: String, memberId: MemberId) {
            self.groupIds = groupIds
            self.identityStoreId = identityStoreId
            self.memberId = memberId
        }

        public func validate(name: String) throws {
            try self.groupIds.forEach {
                try validate($0, name: "groupIds[]", parent: name, max: 47)
                try validate($0, name: "groupIds[]", parent: name, min: 1)
                try validate($0, name: "groupIds[]", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            }
            try self.validate(self.groupIds, name: "groupIds", parent: name, max: 100)
            try self.validate(self.groupIds, name: "groupIds", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.memberId.validate(name: "\(name).memberId")
        }

        private enum CodingKeys: String, CodingKey {
            case groupIds = "GroupIds"
            case identityStoreId = "IdentityStoreId"
            case memberId = "MemberId"
        }
    }

    public struct IsMemberInGroupsResponse: AWSDecodableShape {
        /// A list containing the results of membership existence checks.
        public let results: [GroupMembershipExistenceResult]

        @inlinable
        public init(results: [GroupMembershipExistenceResult]) {
            self.results = results
        }

        private enum CodingKeys: String, CodingKey {
            case results = "Results"
        }
    }

    public struct ListGroupMembershipsForMemberRequest: AWSEncodableShape {
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// The maximum number of results to be returned per request. This parameter is used in the ListUsers and ListGroups requests to specify how many results to return in one page. The length limit is 50 characters.
        public let maxResults: Int?
        /// An object that contains the identifier of a group member. Setting the UserID field to the specific identifier for a user indicates that the user is a member of the group.
        public let memberId: MemberId
        /// The pagination token used for the ListUsers, ListGroups, and ListGroupMemberships API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.
        public let nextToken: String?

        @inlinable
        public init(identityStoreId: String, maxResults: Int? = nil, memberId: MemberId, nextToken: String? = nil) {
            self.identityStoreId = identityStoreId
            self.maxResults = maxResults
            self.memberId = memberId
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.memberId.validate(name: "\(name).memberId")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/:_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case maxResults = "MaxResults"
            case memberId = "MemberId"
            case nextToken = "NextToken"
        }
    }

    public struct ListGroupMembershipsForMemberResponse: AWSDecodableShape {
        /// A list of GroupMembership objects in the group for a specified member.
        public let groupMemberships: [GroupMembership]
        /// The pagination token used for the ListUsers, ListGroups, and ListGroupMemberships API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.
        public let nextToken: String?

        @inlinable
        public init(groupMemberships: [GroupMembership], nextToken: String? = nil) {
            self.groupMemberships = groupMemberships
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case groupMemberships = "GroupMemberships"
            case nextToken = "NextToken"
        }
    }

    public struct ListGroupMembershipsRequest: AWSEncodableShape {
        /// The identifier for a group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// The maximum number of results to be returned per request. This parameter is used in all List requests to specify how many results to return in one page.
        public let maxResults: Int?
        /// The pagination token used for the ListUsers, ListGroups and ListGroupMemberships API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.
        public let nextToken: String?

        @inlinable
        public init(groupId: String, identityStoreId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.groupId = groupId
            self.identityStoreId = identityStoreId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.groupId, name: "groupId", parent: name, max: 47)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/:_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListGroupMembershipsResponse: AWSDecodableShape {
        /// A list of GroupMembership objects in the group.
        public let groupMemberships: [GroupMembership]
        /// The pagination token used for the ListUsers, ListGroups, and ListGroupMemberships API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.
        public let nextToken: String?

        @inlinable
        public init(groupMemberships: [GroupMembership], nextToken: String? = nil) {
            self.groupMemberships = groupMemberships
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case groupMemberships = "GroupMemberships"
            case nextToken = "NextToken"
        }
    }

    public struct ListGroupsRequest: AWSEncodableShape {
        /// A list of Filter objects, which is used in the ListUsers and ListGroups requests.
        public let filters: [Filter]?
        /// The globally unique identifier for the identity store, such as d-1234567890. In this example, d- is a fixed prefix, and 1234567890 is a randomly generated string that contains numbers and lower case letters. This value is generated at the time that a new identity store is created.
        public let identityStoreId: String
        /// The maximum number of results to be returned per request. This parameter is used in the ListUsers and ListGroups requests to specify how many results to return in one page. The length limit is 50 characters.
        public let maxResults: Int?
        /// The pagination token used for the ListUsers and ListGroups API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.
        public let nextToken: String?

        @inlinable
        public init(identityStoreId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = nil
            self.identityStoreId = identityStoreId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        @available(*, deprecated, message: "Members filters have been deprecated")
        @inlinable
        public init(filters: [Filter]? = nil, identityStoreId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.identityStoreId = identityStoreId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/:_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case identityStoreId = "IdentityStoreId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListGroupsResponse: AWSDecodableShape {
        /// A list of Group objects in the identity store.
        public let groups: [Group]
        /// The pagination token used for the ListUsers and ListGroups API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it1 is used in the API request to search for the next page.
        public let nextToken: String?

        @inlinable
        public init(groups: [Group], nextToken: String? = nil) {
            self.groups = groups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case groups = "Groups"
            case nextToken = "NextToken"
        }
    }

    public struct ListUsersRequest: AWSEncodableShape {
        /// A list of Filter objects, which is used in the ListUsers and ListGroups requests.
        public let filters: [Filter]?
        /// The globally unique identifier for the identity store, such as d-1234567890. In this example, d- is a fixed prefix, and 1234567890 is a randomly generated string that contains numbers and lower case letters. This value is generated at the time that a new identity store is created.
        public let identityStoreId: String
        /// The maximum number of results to be returned per request. This parameter is used in the ListUsers and ListGroups requests to specify how many results to return in one page. The length limit is 50 characters.
        public let maxResults: Int?
        /// The pagination token used for the ListUsers and ListGroups API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.
        public let nextToken: String?

        @inlinable
        public init(identityStoreId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = nil
            self.identityStoreId = identityStoreId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        @available(*, deprecated, message: "Members filters have been deprecated")
        @inlinable
        public init(filters: [Filter]? = nil, identityStoreId: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filters = filters
            self.identityStoreId = identityStoreId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filters?.forEach {
                try $0.validate(name: "\(name).filters[]")
            }
            try self.validate(self.filters, name: "filters", parent: name, max: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[-a-zA-Z0-9+=/:_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case filters = "Filters"
            case identityStoreId = "IdentityStoreId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListUsersResponse: AWSDecodableShape {
        /// The pagination token used for the ListUsers and ListGroups API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.
        public let nextToken: String?
        /// A list of User objects in the identity store.
        public let users: [User]

        @inlinable
        public init(nextToken: String? = nil, users: [User]) {
            self.nextToken = nextToken
            self.users = users
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case users = "Users"
        }
    }

    public struct Name: AWSEncodableShape & AWSDecodableShape {
        /// The family name of the user.
        public let familyName: String?
        /// A string containing a formatted version of the name for display.
        public let formatted: String?
        /// The given name of the user.
        public let givenName: String?
        /// The honorific prefix of the user. For example, "Dr."
        public let honorificPrefix: String?
        /// The honorific suffix of the user. For example, "M.D."
        public let honorificSuffix: String?
        /// The middle name of the user.
        public let middleName: String?

        @inlinable
        public init(familyName: String? = nil, formatted: String? = nil, givenName: String? = nil, honorificPrefix: String? = nil, honorificSuffix: String? = nil, middleName: String? = nil) {
            self.familyName = familyName
            self.formatted = formatted
            self.givenName = givenName
            self.honorificPrefix = honorificPrefix
            self.honorificSuffix = honorificSuffix
            self.middleName = middleName
        }

        public func validate(name: String) throws {
            try self.validate(self.familyName, name: "familyName", parent: name, max: 1024)
            try self.validate(self.familyName, name: "familyName", parent: name, min: 1)
            try self.validate(self.familyName, name: "familyName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.formatted, name: "formatted", parent: name, max: 1024)
            try self.validate(self.formatted, name: "formatted", parent: name, min: 1)
            try self.validate(self.formatted, name: "formatted", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.givenName, name: "givenName", parent: name, max: 1024)
            try self.validate(self.givenName, name: "givenName", parent: name, min: 1)
            try self.validate(self.givenName, name: "givenName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.honorificPrefix, name: "honorificPrefix", parent: name, max: 1024)
            try self.validate(self.honorificPrefix, name: "honorificPrefix", parent: name, min: 1)
            try self.validate(self.honorificPrefix, name: "honorificPrefix", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.honorificSuffix, name: "honorificSuffix", parent: name, max: 1024)
            try self.validate(self.honorificSuffix, name: "honorificSuffix", parent: name, min: 1)
            try self.validate(self.honorificSuffix, name: "honorificSuffix", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.middleName, name: "middleName", parent: name, max: 1024)
            try self.validate(self.middleName, name: "middleName", parent: name, min: 1)
            try self.validate(self.middleName, name: "middleName", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case familyName = "FamilyName"
            case formatted = "Formatted"
            case givenName = "GivenName"
            case honorificPrefix = "HonorificPrefix"
            case honorificSuffix = "HonorificSuffix"
            case middleName = "MiddleName"
        }
    }

    public struct PhoneNumber: AWSEncodableShape & AWSDecodableShape {
        /// A Boolean value representing whether this is the primary phone number for the associated resource.
        public let primary: Bool?
        /// A string representing the type of a phone number. For example, "Mobile."
        public let type: String?
        /// A string containing a phone number. For example, "8675309" or "+1 (800) 123-4567".
        public let value: String?

        @inlinable
        public init(primary: Bool? = nil, type: String? = nil, value: String? = nil) {
            self.primary = primary
            self.type = type
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.type, name: "type", parent: name, max: 1024)
            try self.validate(self.type, name: "type", parent: name, min: 1)
            try self.validate(self.type, name: "type", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
            try self.validate(self.value, name: "value", parent: name, max: 1024)
            try self.validate(self.value, name: "value", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\t\\n\\r  　]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case primary = "Primary"
            case type = "Type"
            case value = "Value"
        }
    }

    public struct ResourceNotFoundException: AWSErrorShape {
        public let message: String?
        /// The identifier for each request. This value is a globally unique ID that is generated by the identity store service for each sent request, and is then returned inside the exception if the request fails.
        public let requestId: String?
        /// The identifier for a resource in the identity store that can be used as UserId or GroupId. The format for ResourceId is either UUID or 1234567890-UUID, where UUID is a randomly generated value for each resource when it is created and 1234567890 represents the IdentityStoreId string value. In the case that the identity store is migrated from a legacy SSO identity store, the ResourceId for that identity store will be in the format of UUID. Otherwise, it will be in the 1234567890-UUID format.
        public let resourceId: String?
        /// An enum object indicating the type of resource in the identity store service. Valid values include USER, GROUP, and IDENTITY_STORE.
        public let resourceType: ResourceType?

        @inlinable
        public init(message: String? = nil, requestId: String? = nil, resourceId: String? = nil, resourceType: ResourceType? = nil) {
            self.message = message
            self.requestId = requestId
            self.resourceId = resourceId
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case requestId = "RequestId"
            case resourceId = "ResourceId"
            case resourceType = "ResourceType"
        }
    }

    public struct ServiceQuotaExceededException: AWSErrorShape {
        public let message: String?
        /// The identifier for each request. This value is a globally unique ID that is generated by the identity store service for each sent request, and is then returned inside the exception if the request fails.
        public let requestId: String?

        @inlinable
        public init(message: String? = nil, requestId: String? = nil) {
            self.message = message
            self.requestId = requestId
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case requestId = "RequestId"
        }
    }

    public struct UniqueAttribute: AWSEncodableShape {
        /// A string representation of the path to a given attribute or sub-attribute. Supports JMESPath.
        public let attributePath: String
        /// The value of the attribute. This is a Document type. This type is not supported by Java V1, Go V1, and older versions of the CLI.
        public let attributeValue: AWSDocument

        @inlinable
        public init(attributePath: String, attributeValue: AWSDocument) {
            self.attributePath = attributePath
            self.attributeValue = attributeValue
        }

        public func validate(name: String) throws {
            try self.validate(self.attributePath, name: "attributePath", parent: name, max: 255)
            try self.validate(self.attributePath, name: "attributePath", parent: name, min: 1)
            try self.validate(self.attributePath, name: "attributePath", parent: name, pattern: "^\\p{L}+(?:\\.\\p{L}+){0,2}$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributePath = "AttributePath"
            case attributeValue = "AttributeValue"
        }
    }

    public struct UpdateGroupRequest: AWSEncodableShape {
        /// The identifier for a group in the identity store.
        public let groupId: String
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// A list of AttributeOperation objects to apply to the requested group. These operations might add, replace, or remove an attribute.
        public let operations: [AttributeOperation]

        @inlinable
        public init(groupId: String, identityStoreId: String, operations: [AttributeOperation]) {
            self.groupId = groupId
            self.identityStoreId = identityStoreId
            self.operations = operations
        }

        public func validate(name: String) throws {
            try self.validate(self.groupId, name: "groupId", parent: name, max: 47)
            try self.validate(self.groupId, name: "groupId", parent: name, min: 1)
            try self.validate(self.groupId, name: "groupId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.operations.forEach {
                try $0.validate(name: "\(name).operations[]")
            }
            try self.validate(self.operations, name: "operations", parent: name, max: 100)
            try self.validate(self.operations, name: "operations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case groupId = "GroupId"
            case identityStoreId = "IdentityStoreId"
            case operations = "Operations"
        }
    }

    public struct UpdateGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateUserRequest: AWSEncodableShape {
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// A list of AttributeOperation objects to apply to the requested user. These operations might add, replace, or remove an attribute.
        public let operations: [AttributeOperation]
        /// The identifier for a user in the identity store.
        public let userId: String

        @inlinable
        public init(identityStoreId: String, operations: [AttributeOperation], userId: String) {
            self.identityStoreId = identityStoreId
            self.operations = operations
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, max: 36)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, min: 1)
            try self.validate(self.identityStoreId, name: "identityStoreId", parent: name, pattern: "^d-[0-9a-f]{10}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
            try self.operations.forEach {
                try $0.validate(name: "\(name).operations[]")
            }
            try self.validate(self.operations, name: "operations", parent: name, max: 100)
            try self.validate(self.operations, name: "operations", parent: name, min: 1)
            try self.validate(self.userId, name: "userId", parent: name, max: 47)
            try self.validate(self.userId, name: "userId", parent: name, min: 1)
            try self.validate(self.userId, name: "userId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case identityStoreId = "IdentityStoreId"
            case operations = "Operations"
            case userId = "UserId"
        }
    }

    public struct UpdateUserResponse: AWSDecodableShape {
        public init() {}
    }

    public struct User: AWSDecodableShape {
        /// A list of Address objects containing addresses associated with the user.
        public let addresses: [Address]?
        /// A string containing the  name of the user that is formatted for display when the user is referenced. For example, "John Doe."
        public let displayName: String?
        /// A list of Email objects containing email addresses associated with the user.
        public let emails: [Email]?
        /// A list of ExternalId objects that contains the identifiers issued to this resource by an external identity provider.
        public let externalIds: [ExternalId]?
        /// The globally unique identifier for the identity store.
        public let identityStoreId: String
        /// A string containing the geographical region or location of the user.
        public let locale: String?
        /// An object containing the name of the user.
        public let name: Name?
        /// A string containing an alternate name for the user.
        public let nickName: String?
        /// A list of PhoneNumber objects containing phone numbers associated with the user.
        public let phoneNumbers: [PhoneNumber]?
        /// A string containing the preferred language of the user. For example, "American English" or "en-us."
        public let preferredLanguage: String?
        /// A string containing a URL that might be associated with the user.
        public let profileUrl: String?
        /// A string containing the time zone of the user.
        public let timezone: String?
        /// A string containing the title of the user. Possible values are left unspecified. The value can vary based on your specific use case.
        public let title: String?
        /// The identifier for a user in the identity store.
        public let userId: String
        /// A unique string used to identify the user. The length limit is 128 characters. This value can consist of letters, accented characters, symbols, numbers, and punctuation. This value is specified at the time the user is created and stored as an attribute of the user object in the identity store.
        public let userName: String?
        /// A string indicating the type of user. Possible values are left unspecified. The value can vary based on your specific use case.
        public let userType: String?

        @inlinable
        public init(addresses: [Address]? = nil, displayName: String? = nil, emails: [Email]? = nil, externalIds: [ExternalId]? = nil, identityStoreId: String, locale: String? = nil, name: Name? = nil, nickName: String? = nil, phoneNumbers: [PhoneNumber]? = nil, preferredLanguage: String? = nil, profileUrl: String? = nil, timezone: String? = nil, title: String? = nil, userId: String, userName: String? = nil, userType: String? = nil) {
            self.addresses = addresses
            self.displayName = displayName
            self.emails = emails
            self.externalIds = externalIds
            self.identityStoreId = identityStoreId
            self.locale = locale
            self.name = name
            self.nickName = nickName
            self.phoneNumbers = phoneNumbers
            self.preferredLanguage = preferredLanguage
            self.profileUrl = profileUrl
            self.timezone = timezone
            self.title = title
            self.userId = userId
            self.userName = userName
            self.userType = userType
        }

        private enum CodingKeys: String, CodingKey {
            case addresses = "Addresses"
            case displayName = "DisplayName"
            case emails = "Emails"
            case externalIds = "ExternalIds"
            case identityStoreId = "IdentityStoreId"
            case locale = "Locale"
            case name = "Name"
            case nickName = "NickName"
            case phoneNumbers = "PhoneNumbers"
            case preferredLanguage = "PreferredLanguage"
            case profileUrl = "ProfileUrl"
            case timezone = "Timezone"
            case title = "Title"
            case userId = "UserId"
            case userName = "UserName"
            case userType = "UserType"
        }
    }

    public struct ValidationException: AWSErrorShape {
        public let message: String?
        /// The identifier for each request. This value is a globally unique ID that is generated by the identity store service for each sent request, and is then returned inside the exception if the request fails.
        public let requestId: String?

        @inlinable
        public init(message: String? = nil, requestId: String? = nil) {
            self.message = message
            self.requestId = requestId
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case requestId = "RequestId"
        }
    }

    public struct MemberId: AWSEncodableShape & AWSDecodableShape {
        /// An object containing the identifiers of resources that can be members.
        public let userId: String?

        @inlinable
        public init(userId: String? = nil) {
            self.userId = userId
        }

        public func validate(name: String) throws {
            try self.validate(self.userId, name: "userId", parent: name, max: 47)
            try self.validate(self.userId, name: "userId", parent: name, min: 1)
            try self.validate(self.userId, name: "userId", parent: name, pattern: "^([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}$")
        }

        private enum CodingKeys: String, CodingKey {
            case userId = "UserId"
        }
    }
}

// MARK: - Errors

/// Error enum for IdentityStore
public struct IdentityStoreErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case conflictException = "ConflictException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case throttlingException = "ThrottlingException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize IdentityStore
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// You do not have sufficient access to perform this action.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// This request cannot be completed for one of the following reasons:   Performing the requested operation would violate an existing uniqueness claim in the identity store. Resolve the conflict before retrying this request.   The requested resource was being concurrently modified by another request.
    public static var conflictException: Self { .init(.conflictException) }
    /// The request processing has failed because of an unknown error, exception or failure with an internal server.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// Indicates that a requested resource is not found.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The request would cause the number of users or groups in the identity store to exceed the maximum allowed.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// Indicates that the principal has crossed the throttling limits of the API operations.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// The request failed because it contains a syntax error.
    public static var validationException: Self { .init(.validationException) }
}

extension IdentityStoreErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "ConflictException": IdentityStore.ConflictException.self,
        "ResourceNotFoundException": IdentityStore.ResourceNotFoundException.self,
        "ServiceQuotaExceededException": IdentityStore.ServiceQuotaExceededException.self,
        "ValidationException": IdentityStore.ValidationException.self
    ]
}

extension IdentityStoreErrorType: Equatable {
    public static func == (lhs: IdentityStoreErrorType, rhs: IdentityStoreErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension IdentityStoreErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
